package com.example.springevent.event.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import com.example.springevent.event.event.StringEvent;

// 不正确的示范ApplicationListener<StringEvent<String>>
@Component
public class StringEventListener implements ApplicationListener<StringEvent<String>>{

	private static final Logger log = LoggerFactory.getLogger(StringEventListener.class);

	@Override
	public void onApplicationEvent(StringEvent<String> event) {
		log.info("事件监听会触发吗？");
	}

}
